package com.base.cn.platform.os.service.manage.help;

import com.base.cn.platform.os.service.FeignAuthConfig;
import com.base.cn.platform.os.service.manage.BaseService;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

/**
 * 帮助文档接口
 *
 * @author s.li
 * @create 2018-04-02-11:28
 */
@FeignClient(name = BaseService.appName,configuration = FeignAuthConfig.class)
public interface SysHelpCenterService extends BaseService {
    /**
     * 保存帮助文档
     * @param helpCenter 帮助文档对象
     * @return Map<String,Object>
     */
    @RequestMapping(contextPath + "/saveHelpCenter")
    Map<String,Object> saveHelpCenter(@RequestBody Map<String, Object> helpCenter);

    /**
     * 查询帮助文档列表
     * @param sysHelpCenter 查询条件
     * @param contextData 是否获取内容，true获取，false不获取
     * @return List<SysHelpCenter>
     */
    @RequestMapping(contextPath + "/findSysHelpCenter")
    List<Map<String,Object>> findSysHelpCenter(@RequestBody Map<String, Object> sysHelpCenter, @RequestParam("contextData") boolean contextData);

    /**
     * 通过ID查询帮助文档内容
     * @param helpId 帮助ID
     * @return SysHelpCenter
     */
    @RequestMapping(contextPath + "/findHelpCenterById")
    Map<String,Object> findHelpCenterById(@RequestParam("id") BigDecimal helpId);

    /**
     * 删除帮助文档数据
     * @param ids 帮助文档ID串
     * @return Map<String,Object>
     */
    @RequestMapping(contextPath + "/deleteHelpCenter")
    Map<String,Object> deleteHelpCenter(@RequestParam("ids") String ids);

    /**
     * 修改帮助状态成功
     * @param ids 状态ID串
     * @param status 状态，1正常，2隐藏
     * @return Map<String,Object>
     */
    @RequestMapping(contextPath + "/updateHelpStatus")
    Map<String,Object> updateHelpStatus(@RequestParam("ids") String ids, @RequestParam("status") int status);

    /**
     * 获取前台底部帮助文档数据
     * @return List<SysHelpCenter>
     */
    @RequestMapping(contextPath + "/findWebFooterHelp")
    List<Map<String,Object>> findWebFooterHelp();

    /**
     * 获取帮助中心内容
     * @param helpCenter
     * @return
     */
    @RequestMapping(contextPath + "/findPageHelpList")
    List<Map<String,Object>> findPageHelpList(@RequestBody Map<String, Object> helpCenter,
                                              @RequestParam("contextData") boolean contextData);
}
